package cn.congine.wizarpos.mall.action;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "/error")
public class ErrorAction {
	
	@RequestMapping(value = "/error")
	@ResponseBody
	public ModelAndView error(String msg) throws UnsupportedEncodingException {
		return new ModelAndView("error").addObject("err_message", URLDecoder.decode(msg, "UTF-8"));
	}
}
